import { mockApi } from "@/mock";
import type {
  DataSource,
  DataSourceQuery,
  DataSourceResponse,
} from "@/types/dataSource";

export const getDataSourceList = (params: DataSourceQuery) => {
  return mockApi.getDataSourceList(params);
};

export const createDataSource = (data: Omit<DataSource, "id">) => {
  return mockApi.createDataSource(data);
};

export const updateDataSource = (id: number, data: Partial<DataSource>) => {
  return mockApi.updateDataSource(id, data);
};

export const deleteDataSource = (id: number) => {
  return mockApi.deleteDataSource(id);
};

export const testDataSourceConnection = (id: number) => {
  return mockApi.testDataSourceConnection(id);
};
